コード例 #1
0
        private void Awake()
        {
            rb2D      = GetComponentInChildren <Rigidbody2D>();
            character = GetComponent <CharacterInfo_Container>();

            targetRotationY_2D = transform.localEulerAngles.y;
        }
コード例 #2
0
        //General info --------------------------------------------------------------------------
        #region General Info

        public CharacterInfo TryGetCharacterInfo()
        {
            //This is a miguezao to make a character description available in the behaviour script, just to be a little more organized, because f**k me
            CharacterInfo_Container container = GetComponent <CharacterInfo_Container>();

            if (!container)
            {
                return(null);
            }

            CharacterInfo info = container.info;

            if (!info)
            {
                return(null);
            }
            else
            {
                return(info);
            }
        }