Пример #1
0
        public override void OnEnter(BInput input)
        {
            SoliderPlayer tinput = input as SoliderPlayer;

            tinput.StopAllAction();
//			Debug.Log("ActionSoliderStop");
        }
Пример #2
0
        public override void OnEnter(BInput input)
        {
            SoliderPlayer tinput = input as SoliderPlayer;

            tinput.MoveAround();
//			Debug.Log("MoveAround");
        }
Пример #3
0
        public override void OnEnter(BInput input)
        {
            this.over = false;
            SoliderPlayer tinput = input as SoliderPlayer;

            tinput.AttackEnemy(this);
            this.m_ftime = Time.time;
//			Debug.Log("ActionSoliderAttack");
        }
Пример #4
0
    void Start()
    {
        m_Character  = GetComponent <SoliderPlayer>();
        linePointMap = new Dictionary <int, GameObject> ();
        int i = 0;

        foreach (GameObject obj in linePointList)
        {
            linePointMap.Add(i++, obj);
        }
    }
Пример #5
0
        public override ActionResult Excute(BInput input)
        {
            SoliderPlayer tinput         = input as SoliderPlayer;
            bool          isEnemyInSight = tinput.NearbyExistEnemy();

            if (isEnemyInSight)
            {
//				Debug.LogError ("ConditionNearbyAliveEnemy 范围内存在敌人"+this.m_strName);
                return(ActionResult.SUCCESS);
            }
//			Debug.LogError ("ConditionNearbyAliveEnemy 范围内不存在敌人"+this.m_strName);
            return(ActionResult.FAILURE);
        }
Пример #6
0
        //excute
        public override ActionResult Excute(BInput input)
        {
            SoliderPlayer tinput = input as SoliderPlayer;

            if (tinput.NearbyExistEnemy())
            {
                return(ActionResult.FAILURE);
            }
            else if (tinput.moveRoundTweener == null)
            {
                return(ActionResult.SUCCESS);
            }
            else
            {
                return(ActionResult.RUNNING);
            }
        }
 void OnTriggerExit2D(Collider2D collider2D)
 {
     foreach (var component in collider2D.gameObject.GetComponents <Component>())
     {
         SoliderPlayer player = component as SoliderPlayer;
         if (player != null)
         {
             foreach (var myComponent in this.gameObject.GetComponents <Component>())
             {
                 SoliderPlayer myPlayer = myComponent as SoliderPlayer;
                 if (myPlayer != null)
                 {
                     if (myPlayer.soliderGroup != player.soliderGroup)
                     {
                         isEnemyInSight  = false;
                         enemyInSightObj = null;
                     }
                 }
             }
         }
     }
 }
    void OnTriggerEnter2D(Collider2D collider2D)
    {
//		Debug.Log ("OnTriggerEnter2D"+collider2D.gameObject.name);
        foreach (var component in collider2D.gameObject.GetComponents <Component>())
        {
            SoliderPlayer player = component as SoliderPlayer;
            if (player != null)
            {
                foreach (var myComponent in this.transform.parent.gameObject.GetComponents <Component>())
                {
                    SoliderPlayer myPlayer = myComponent as SoliderPlayer;
                    if (myPlayer != null)
                    {
                        if (myPlayer.soliderGroup != player.soliderGroup)
                        {
                            isEnemyInSight  = true;
                            enemyInSightObj = collider2D.gameObject;
                        }
                    }
                }
            }
        }
    }
Пример #9
0
        public override void OnEnter(BInput input)
        {
            SoliderPlayer tinput = input as SoliderPlayer;

            tinput.Escape();
        }