This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; | |
public class FlashingGraphic : MonoBehaviour | |
{ | |
[SerializeField] Graphic m_Graphics; | |
[SerializeField] float m_AngularFrequency = 1.0f; | |
[SerializeField] float m_DeltaTime = 0.0333f; | |
Coroutine m_Coroutine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ChangeInput() | |
{ | |
var sim = GameObject.FindObjectOfType<StandaloneInputModule> () | |
sim.horizontalAxis = "XAxis"; | |
sim.verticalAxis = "YAxis"; | |
sim.submitButton = "ButtonA"; | |
sim.cancelButton = "ButtonB"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Animation(GameObject selected) | |
{ | |
var eventSystem = GameObject.FindObjectOfType<EventSystem> (); | |
eventSystem.enabled = false; | |
// Animation | |
eventSystem.enabled = true; | |
eventSystem.SetSelectedGameObject (selected); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
enum class GamepadAxis | |
{ | |
X, Y, Z, R, U, V | |
}; | |
enum class XInputAxis | |
{ | |
LeftThumbX, LeftThumbY, RightThumbX, RightThumbY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
# include "Axis.cpp" | |
class Axis::CAxis | |
{ | |
public: | |
virtual operator double() const = 0; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
class AxisCombination | |
{ | |
private: | |
Array<Axis> m_axes; | |
template <typename Type, typename ... Args> | |
void append(const Type& axis, const Args& ... args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
# include "AxisCombination.hpp" | |
void AxisCombination::append() {} | |
void AxisCombination::append(Axis axis) | |
{ | |
m_axes.push_back(axis); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
# include "AscInput.hpp" | |
using namespace asc; | |
void Main() | |
{ | |
asc::Input input; | |
Gamepad gamepad(0); | |
XInput xinput(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
# include "AscAxis.hpp" | |
namespace asc | |
{ | |
using namespace s3d; | |
class Input | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
# include <unordered_map> | |
# include "AscAxis.hpp" | |
# include "AscInput.hpp" | |
namespace asc | |
{ | |
class Input::CInput | |
{ |