コード例 #1
0
 protected override void Start()
 {
     base.Start();
     anim           = GetComponent <Animator> ();
     movement       = FindObjectOfType <ControlMovement>();
     buttonSwitcher = FindObjectOfType <ButtonSwitcher>();
 }
コード例 #2
0
ファイル: NPCTalkTrigger.cs プロジェクト: Jlancy/DEE-files
 // Use this for initialization
 void Start()
 {
     controlMovement = FindObjectOfType<ControlMovement>();
     buttonSwitcher = FindObjectOfType<ButtonSwitcher>();
     npc = this.transform.GetComponentInParent<NPC>();
     //Debug.Log(npc.name);
     inventroy = FindObjectOfType<Inventory>();
 }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     controlMovement = FindObjectOfType <ControlMovement>();
     buttonSwitcher  = FindObjectOfType <ButtonSwitcher>();
     npc             = this.transform.GetComponentInParent <NPC>();
     //Debug.Log(npc.name);
     inventroy = FindObjectOfType <Inventory>();
 }
コード例 #4
0
        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}");
        }
コード例 #5
0
    // 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();
    }
コード例 #6
0
        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);
        }
コード例 #7
0
 public RobotRoverServicesTests()
 {
     _fixture = new Fixture();
     _sut     = new ControlMovement();
     _sut.SetPosition(10, 10, Direction.N);
 }
コード例 #8
0
ファイル: ButtonSwitcher.cs プロジェクト: Jlancy/DEE-files
    // 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();
    }
コード例 #9
0
ファイル: tempMovement.cs プロジェクト: Jlancy/DEE-files
 // Use this for initialization
 void Start()
 {
     movement = FindObjectOfType <ControlMovement>();
 }