コード例 #1
0
ファイル: Patrol.cs プロジェクト: request-time-out/A-Scripts
 public override void OnReset()
 {
     base.OnReset();
     this.randomPatrol          = (SharedBool)false;
     this.waypointPauseDuration = (SharedFloat)0.0f;
     this.waypoints             = (SharedGameObjectList)null;
 }
コード例 #2
0
 public override void OnReset()
 {
     scanOrigin           = null;
     scanRange            = null;
     objectLayerMask      = -1;
     listToStoreHitObject = null;
 }
コード例 #3
0
ファイル: MyPatrol.cs プロジェクト: Fuyaocc/JungleWar
 // Reset the public variables
 public override void OnReset()
 {
     base.OnReset();
     randomPatrol          = false;
     waypointPauseDuration = 0;
     waypoints             = null;
 }
        public override void OnReset()
        {
            // Reset the properties back to their original values

            eventName            = "";
            storedGameObjectList = null;
        }
コード例 #5
0
ファイル: Patrol.cs プロジェクト: emccrckn/DadSimulator
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            randomPatrol = false;
            waypointPauseDuration = 0;
            waypoints = null;
        }
コード例 #6
0
 public override void OnReset()
 {
     storedGameObjectList = null;
     distanceFrom         = Vector3.zero;
     closestGameObject    = null;
     closestIndex         = null;
     positionToTest       = Vector3.zero;
     distanceFromGO       = null;
     distance             = null;
 }
コード例 #7
0
 public override void OnStart()
 {
     sqrMagnitude = magnitude.Value * magnitude.Value;
     if (targetTag.Value == "Player")
     {
         objects = Players;
     }
     else if (targetTag.Value == "Enemy")
     {
         objects = Enemys;
     }
 }
コード例 #8
0
        private void InitWaypoints()
        {
            // initialize waypoints based on waypoints parent

            List <GameObject> mywpts = new List <GameObject> ();

            for (int i = 0; i < waypointsparent.Value.transform.childCount; i++)
            {
                mywpts.Add(waypointsparent.Value.transform.GetChild(i).gameObject);
            }
            waypoints = (SharedGameObjectList)mywpts;
        }
コード例 #9
0
ファイル: MyPatrol.cs プロジェクト: Fuyaocc/JungleWar
        public override void OnStart()
        {
            base.OnStart();

            animator   = GetComponent <Animator>();
            MoveHashId = Animator.StringToHash("Walk");
            animator.SetBool(MoveHashId, true);

            #region 设置路径
            GameObject obj = GameObject.FindWithTag("Pos");
            if (obj == null)
            {
                if (gameObject.name == "Hunter_YELLOW(Clone)")
                {
                    obj = Resources.Load("Prefabs/YellowPoslist") as GameObject;
                }
                else
                {
                    obj = Resources.Load("Prefabs/GreenPoslist") as GameObject;
                }
                GameObject        ob      = GameObject.Instantiate(obj);
                Transform[]       trans   = ob.transform.GetComponentsInChildren <Transform>();
                List <GameObject> objList = new List <GameObject>();
                for (int i = 1; i < trans.Length; ++i)
                {
                    objList.Add(trans[i].gameObject);
                }
                waypoints = objList;
            }
            #endregion

            // initially move towards the closest waypoint
            float distance = Mathf.Infinity;
            float localDistance;
            for (int i = 0; i < waypoints.Value.Count; ++i)
            {
                if ((localDistance = Vector3.Magnitude(transform.position - waypoints.Value[i].transform.position)) < distance)
                {
                    distance      = localDistance;
                    waypointIndex = i;
                }
            }
            waypointReachedTime = -1;
            SetDestination(Target());
        }
コード例 #10
0
    private void RandomMovetoTarget()
    {
        if (GameResMgr.IsSingletonDestory)
        {
            return;
        }
        m_CurrentTarget = RandomTraget(m_CurrentTarget);
        if (m_CurrentTarget != null)
        {
            SharedGameObject sgoPlayer = m_Player.gameObject;
            m_MamaBT.SetVariable("SeePlayerObj", sgoPlayer);

            SharedGameObject sgo = m_CurrentTarget.gameObject;
            m_MamaBT.SetVariable("MoveTo", sgo);
            SharedFloat sf = Mathf.Sign(m_CurrentTarget.position.x - transform.position.x) * 90;
            m_MamaBT.SetVariable("AngleOff2D", sf);
            List <GameObject> canSeeObjs = new List <GameObject>();
            canSeeObjs.Add(GameResMgr.Instance.m_LayerRes[m_InitLayer].m_Door.gameObject);
            SharedGameObjectList sgl = canSeeObjs;
            m_MamaBT.SetVariable("SeeObjs", sgl);
            TryFlipSR(m_CurrentTarget);
        }
    }
コード例 #11
0
 public override void OnReset()
 {
     gameObjects          = null;
     storedGameObjectList = null;
 }
コード例 #12
0
 public override void OnReset()
 {
     m_SensorSource = null;
     m_targets      = null;
 }
コード例 #13
0
 public override void OnReset()
 {
     storedGameObjectList = null;
     maxCount             = null;
 }
コード例 #14
0
 public override void OnReset()
 {
     this.variable  = null;
     this.compareTo = null;
 }
コード例 #15
0
 public virtual void OnReset()
 {
     this.variable  = (SharedGameObjectList)null;
     this.compareTo = (SharedGameObjectList)null;
 }
コード例 #16
0
ファイル: TacticalGroup.cs プロジェクト: JoryTheDrunk/Lerpz
 /// <summary>
 /// Reset the public variables back to their defaults.
 /// </summary>
 public override void OnReset()
 {
     targetGroup = null;
     targetTag   = "";
     waitTime    = 0;
 }
 public override void OnReset()
 {
     variable  = null;
     compareTo = null;
 }
コード例 #18
0
 public virtual void OnReset()
 {
     this.targetValue    = (SharedGameObjectList)null;
     this.targetVariable = (SharedGameObjectList)null;
 }
コード例 #19
0
 public override void OnReset()
 {
     theList        = null;
     index          = null;
     returnedObject = null;
 }
コード例 #20
0
 public override void OnReset()
 {
     m_gameObjectList = null;
     m_ReturnedObject = null;
 }
コード例 #21
0
 public override void OnReset()
 {
     GO            = null;
     storedVGOList = null;
 }
コード例 #22
0
 public virtual void OnReset()
 {
     this.gameObjects          = (SharedGameObject[])null;
     this.storedGameObjectList = (SharedGameObjectList)null;
 }
コード例 #23
0
 public override void OnReset()
 {
     gameObjects = null;
     storedGameObjectList = null;
 }
コード例 #24
0
 public override void OnReset()
 {
     this.gameObjects          = null;
     this.storedGameObjectList = null;
 }
コード例 #25
0
 public override void OnReset()
 {
     targetValue = null;
     targetVariable = null;
 }
 public override void OnReset()
 {
     targetValue    = null;
     targetVariable = null;
 }
コード例 #27
0
 public override void OnReset()
 {
     m_SensorSource    = null;
     m_TargetFilter    = null;
     m_targetsDetected = null;
 }
コード例 #28
0
 public override void OnReset()
 {
     m_selfObject            = null;
     m_storeTargetTransforms = null;
     m_targetObject          = null;
 }
コード例 #29
0
 public override void OnReset()
 {
     variable = null;
     compareTo = null;
 }
コード例 #30
0
 public override void OnReset()
 {
     storedList = null;
 }