protected override void Start() { base.Start(); anim = GetComponent <Animator> (); movement = FindObjectOfType <ControlMovement>(); buttonSwitcher = FindObjectOfType <ButtonSwitcher>(); }
// Use this for initialization void Start() { controlMovement = FindObjectOfType<ControlMovement>(); buttonSwitcher = FindObjectOfType<ButtonSwitcher>(); npc = this.transform.GetComponentInParent<NPC>(); //Debug.Log(npc.name); inventroy = FindObjectOfType<Inventory>(); }
// Use this for initialization void Start() { controlMovement = FindObjectOfType <ControlMovement>(); buttonSwitcher = FindObjectOfType <ButtonSwitcher>(); npc = this.transform.GetComponentInParent <NPC>(); //Debug.Log(npc.name); inventroy = FindObjectOfType <Inventory>(); }
static void Main(string[] args) { IControlMovement controlMovement = new ControlMovement(); controlMovement.SetPosition(10, 10, Direction.N); controlMovement.Move("R1R3L2L1"); Console.WriteLine($"X:{controlMovement.GridLocation.X} Y:{controlMovement.GridLocation.Y} Direction:{controlMovement.GridLocation.Direction}"); }
// Use this for initialization void Start() { controlMovement = FindObjectOfType <ControlMovement>(); ButtomRect = GetComponent <RectTransform>(); MinOrigin = ButtomRect.offsetMin; MaxOrigin = ButtomRect.offsetMax; //TargetPosition = new Vector2(transform.position.x, transform.position.y - TargetY); MinEnd = new Vector2(MinOrigin.x, MinOrigin.y - TargetY); MaxEnd = new Vector2(MaxOrigin.x, MaxOrigin.y - TargetY);; button = this.GetComponent <Button>(); buttonState = ButtonState.Attack; player = FindObjectOfType <Player>(); textTyper = FindObjectOfType <TextTyper>(); //Initail call of SwitchButton so we can attack at start buttonState = ButtonState.Attack; SwitchButton(); }
void AddControlMovement() { switch (m_ControlType) { case ControlType.Hovercraft: m_ControlMovement = gameObject.AddComponent <Hovercraft>(); m_CanMoveOnY = true; m_IgnoreYAxis = true; break; case ControlType.Aircraft: m_ControlMovement = gameObject.AddComponent <Aircraft>(); m_CanMoveOnY = true; m_IgnoreYAxis = false; break; } m_ControlMovement.Setup(m_Group, m_ScopedBricks, m_scopedPartRenderers, m_BrickPivotOffset, m_ScopedBounds, m_CameraAlignedRotation, m_CameraRelativeMovement); }
public RobotRoverServicesTests() { _fixture = new Fixture(); _sut = new ControlMovement(); _sut.SetPosition(10, 10, Direction.N); }
// Use this for initialization void Start() { controlMovement = FindObjectOfType<ControlMovement>(); ButtomRect = GetComponent<RectTransform>(); MinOrigin = ButtomRect.offsetMin; MaxOrigin = ButtomRect.offsetMax; //TargetPosition = new Vector2(transform.position.x, transform.position.y - TargetY); MinEnd = new Vector2(MinOrigin.x, MinOrigin.y - TargetY); MaxEnd = new Vector2(MaxOrigin.x, MaxOrigin.y - TargetY);; button = this.GetComponent<Button>(); buttonState = ButtonState.Attack; player = FindObjectOfType<Player>(); textTyper = FindObjectOfType<TextTyper>(); //Initail call of SwitchButton so we can attack at start buttonState = ButtonState.Attack; SwitchButton(); }
// Use this for initialization void Start() { movement = FindObjectOfType <ControlMovement>(); }