// Use this for initialization void Start() { movementScript = GameObject.FindObjectOfType(typeof(spt_monsterMovement)) as spt_monsterMovement; motivationScript = GameObject.FindObjectOfType(typeof(spt_monsterMotivation)) as spt_monsterMotivation; writer = new StreamWriter("DataDump/aiSnapshotDataDump.txt"); writer.WriteLine("Datetime,Elapsed Time (in Seconds),Current Waypoint,Anger Level"); InvokeRepeating("snapshot", 1, 1); }
// Use this for initialization void Start () { rend = GetComponent<Renderer>(); rend.enabled = false; monster = GameObject.FindObjectOfType<spt_monsterMovement>(); if (isFlashlight) data = new spt_flashlightClass(angerNum, rend); else data = new spt_baseAngerClass(angerNum, rend); // toggles the visibility of objects on an interval (for testing purposes) InvokeRepeating("toggleVisibility", visibleToggleInterval, visibleToggleInterval); // Performs the "per-tick" calculations needed on actions with a duration (like the flashlight). InvokeRepeating("incrementTimer", data.getDuration(), data.getDuration()); }
// Use this for initialization void Start() { movementScript = GameObject.FindObjectOfType(typeof(spt_monsterMovement)) as spt_monsterMovement; animationScript = GameObject.FindObjectOfType(typeof(spt_monsterAnimations)) as spt_monsterAnimations; if (!isServer) return; players = getHost(); // Sets the initial anger level of the monster to zero. angerLevel = 0; isAttacking = false; //Begins the gradual anger depreciation over time. InvokeRepeating("angerDepreciation", 1, 1); GameObject[] _players = GameObject.FindGameObjectsWithTag("Player"); }