示例#1
0
        public void returnToIdle(DirectionalAnimation source)
        {
            GameObject.FindGameObjectWithTag("Weapon").GetComponentInChildren <SpriteRenderer> ().sprite = idolPos;
            weapAnim.IsPlaying = false;

            Attacking = false;
        }
示例#2
0
 void Start()
 {
     m_physicBhv = GetComponent <PhysicCharBehaviour>();
     m_dirAnim   = GetComponent <DirectionalAnimation>();
     StopAllCoroutines();
     StartCoroutine(DoLogic());
 }
 public void reset(DirectionalAnimation source)
 {
     attack.IsPlaying = false;
     attack.enabled   = false;
     Destroy(weapCollid);
     canMove = true;
 }
 void Start()
 {
     m_animCtrl = GetComponents <DirectionalAnimation>()[0];
     m_phyChar  = GetComponent <PhysicCharBehaviour>();
     TargetTile = RpgMapHelper.GetAutoTileByPosition(transform.position, 0);
     ableToMove = true;
 }
 void Start()
 {
     m_moving = GetComponent <MovingBehaviour>();
     m_pathFindingBehaviour           = GetComponent <MapPathFindingBehaviour>();
     m_animCtrl                       = GetComponent <DirectionalAnimation>();
     m_pathFindingBehaviour.TargetPos = transform.position;
 }
示例#6
0
 // Use this for initialization
 void Start()
 {
     m_moving = GetComponent<MovingBehaviour>();
     m_pathFindingBehaviour = GetComponent<MapPathFindingBehaviour>();
     m_animCtrl = GetComponent<DirectionalAnimation>();
     m_pathFindingBehaviour.TargetPos = transform.position;
 }
示例#7
0
 void Start()
 {
     m_fAngOff = 360f * Random.value;
     m_moving  = GetComponent <MovingBehaviour>();
     m_phyChar = GetComponent <PhysicCharBehaviour>();
     m_pathFindingBehaviour = GetComponent <MapPathFindingBehaviour>();
     m_animCtrl             = GetComponent <DirectionalAnimation>();
 }
 void OnEnable()
 {
     m_repaintTimeStamp = Time.realtimeSinceStartup;
     m_target           = (DirectionalAnimation)target;
     if (m_target.DirectionalAnimController)
     {
         m_animReordList = CreateAnimReorderableList();
     }
 }
示例#9
0
 // Use this for initialization
 void Start()
 {
     m_fAngOff = 360f * Random.value;
     m_player = GameObject.FindGameObjectWithTag("Player");
     m_moving = GetComponent<MovingBehaviour>();
     m_phyChar = GetComponent<PhysicCharBehaviour>();
     m_pathFindingBehaviour = GetComponent<MapPathFindingBehaviour>();
     m_animCtrl = GetComponent<DirectionalAnimation>();
 }
 protected override void Start()
 {
     base.Start();
     m_tileMovementBehaviour = GetComponent <TileMovementBehaviour>();
     //equanim = gameObject.GetComponent<Equipment> ();
     canMove        = true;
     attack         = GetComponents <DirectionalAnimation> () [1];
     attack.enabled = false;
     currDir        = m_phyChar.Dir;
 }
示例#11
0
        // Use this for initialization
        void Start()
        {
            Attacking  = false;
            m_animCtrl = transform.parent.gameObject.GetComponent <DirectionalAnimation> ();

            weapAnim                      = GetComponent <DirectionalAnimation>();
            weapAnim.AnimSpeed            = 7;
            weapAnim.IsPlaying            = false;
            WeaponSprite                  = GetComponentInChildren <SpriteRenderer> ();
            weapAnim.OnAnimationLoopOver += returnToIdle;
        }
示例#12
0
 // Use this for initialization
 void Start()
 {
     m_animCtrl = GetComponent <DirectionalAnimation>();
     m_phyChar  = GetComponent <PhysicCharBehaviour>();
     targetTile = this.transform.position;
     ableToMove = true;
     spawnTile  = targetTile;
     tmov       = GetComponent <TileMovementBehaviour> ();
     curr       = transform.position;
     foundTarg  = false;
 }
示例#13
0
        public static void CreateDirAnimCharacter()
        {
            GameObject           obj = new GameObject("Character");
            DirectionalAnimation CharAnimationController = obj.AddComponent <DirectionalAnimation>();
            SpriteRenderer       sprRenderer             = obj.AddComponent <SpriteRenderer>();

            CharAnimationController.TargetSpriteRenderer = sprRenderer;
            Selection.activeObject = obj;
            Camera sceneCam = (SceneView.currentDrawingSceneView ?? SceneView.lastActiveSceneView).camera;

            obj.transform.position = sceneCam.ViewportToWorldPoint(new Vector3(0.5f, 0.5f, 10f));
            obj.transform.position = new Vector3(obj.transform.position.x, obj.transform.position.y, -0.5f);
        }
示例#14
0
 // Use this for initialization
 void Start()
 {
     //charinv = this.GetComponent<Inventory> ();
     equipManager   = new idvEquip();
     m_charAnimCtrl = GetComponent <DirectionalAnimation>();
     hashT          = new Dictionary <string, GameObject>();
     phy            = GetComponent <PhysicCharBehaviour> ();
     hashT.Add("Helm", equipManager.helm);
     hashT.Add("Chest", equipManager.chest);
     hashT.Add("Legs", equipManager.legs);
     hashT.Add("Weapon", equipManager.weapon);
     hashT.Add("Shield", equipManager.shield);
     hashT.Add("Necklace", equipManager.necklace);
     hashT.Add("Ring", equipManager.ring);
     animName = "Blank char";
 }
示例#15
0
 protected virtual void Start()
 {
     m_animCtrl = GetComponent<DirectionalAnimation>();
     m_phyChar = GetComponent<PhysicCharBehaviour>();
 }
示例#16
0
 // Use this for initialization
 void Start()
 {
     m_charAnimCtrl = GetComponent<DirectionalAnimation>();
 }
 void OnEnable()
 {
     m_repaintTimeStamp = Time.realtimeSinceStartup;
     m_target = (DirectionalAnimation)target;
     if (m_target.DirectionalAnimController)
     {
         m_animReordList = CreateAnimReorderableList();
     }
 }
示例#18
0
 protected virtual void Start()
 {
     m_animCtrl = GetComponent <DirectionalAnimation>();
     m_phyChar  = GetComponent <PhysicCharBehaviour>();
 }
示例#19
0
 // Use this for initialization
 void Start()
 {
     m_baseAnimCtrl = transform.parent.gameObject.GetComponent <DirectionalAnimation> ();
     EquipSprite    = GetComponent <DirectionalAnimation> ();
 }
示例#20
0
 void Start()
 {
     m_charAnimCtrl = GetComponent <DirectionalAnimation>();
 }
示例#21
0
 void Start()
 {
     m_physicBhv = GetComponent<PhysicCharBehaviour>();
     m_dirAnim = GetComponent<DirectionalAnimation>();
     StopAllCoroutines();
     StartCoroutine(DoLogic());
 }