// Use this for initialization
    void Start()
    {
        special       = transform.root.GetComponent <SpecialSystem>();
        playerControl = transform.root.GetComponent <CharacterController2D>();

        anim = transform.root.gameObject.GetComponent <Animator> ();
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        special       = transform.root.GetComponent <SpecialSystem>();
        hitbox        = GetComponent <BoxCollider2D>();
        effect        = GetComponent <SpriteRenderer>();
        playerControl = transform.root.GetComponent <CharacterController2D>();

        anim = transform.root.gameObject.GetComponent <Animator>();
    }
예제 #3
0
        private void Start()
        {
            // get the transform of the main camera
            if (Camera.main != null)
            {
                m_Cam = Camera.main.transform;
            }
            else
            {
                Debug.LogWarning(
                    "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls.");
                // we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them!
            }

            // get the third person character ( this should never be null due to require component )
            m_Character = GetComponent <SwordsmanCharacter>();


            // init mouseInput
            //mouseInput = new MouseInputStruct();

            MouseBehavior.mouseInputDelegate += MouseInputHandle;

            //special move initialization
            //m_Character.m_specialMoveIndex = -1;
            m_specialMoveStage = 0;

            //---cache reference to pattern system controller---
            psController = GameObject.FindGameObjectWithTag("PatternSystemController").GetComponent <PatternSystemController>();

            //---cache reference to special system---
            specialSystem = GameObject.FindGameObjectWithTag("SpecialSystem").GetComponent <SpecialSystem>();

            //---cache reference to sound system---
            soundSystem = GameObject.FindGameObjectWithTag("SoundSystem").GetComponent <SoundSystem>();
        }
예제 #4
0
 void Start()
 {
     special = GameObject.Find("Player Character").GetComponent <SpecialSystem>();
 }
예제 #5
0
    // Use this for initialization
    void Start()
    {
        special = transform.root.GetComponent <SpecialSystem>();

        anim = transform.root.gameObject.GetComponent <Animator> ();
    }