示例#1
0
        public RobStoreAction(Citizen_Criminal_Robber self, Building target)
        {
            Self            = self;
            ActionCompleted = false;

            try{
                try{
                    CurrentActionTarget = target.gameObject;
                }
                catch (System.Exception) {
                    MonoBehaviour.Destroy(self.gameObject);
                }
                CurrentActionTarget = target.gameObject;
                ObjectiveRange      = 0.15f;

                Self.SetPersonActive(true);

                targetScript = target as Building_Normal_Service;

                targetPosition = target.transform;

                animator = Self.anim;
            }
            catch (MissingReferenceException)
            {
                MonoBehaviour.Destroy(Self.gameObject);
            }
        }
示例#2
0
        public RobPersonAction(Citizen_Criminal_Robber self, CitizenBehaviour target)
        {
            Self            = self;
            ActionCompleted = false;
            try{
                CurrentActionTarget = target.gameObject;
            }
            catch (System.Exception) {
                MonoBehaviour.Destroy(self.gameObject);
            }
            ObjectiveRange = 0.15f;

            //Make sure all citizens spawn inside houses, and then moves out
            Self.SetPersonActive(true);

            targetScript   = target as Citizen_Civilian;
            targetPosition = CurrentActionTarget.transform.GetChild(0).GetChild(0);

            animator = Self.anim;
        }