void Awake()
 {
     // make this a singleton
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(this.gameObject);
     }
 }
Esempio n. 2
0
        public Character(uint actorID) : base(actorID)
        {
            //Init timer array to "notimer"
            for (int i = 0; i < charaWork.statusShownTime.Length; i++)
            {
                charaWork.statusShownTime[i] = 0;
            }

            this.statusEffects = new StatusEffectContainer(this);

            // todo: move this somewhere more appropriate
            // todo: base this on equip and shit
            SetMod((uint)Modifier.AttackRange, 3);
            SetMod((uint)Modifier.AttackDelay, (Program.Random.Next(30, 60) * 100));
            SetMod((uint)Modifier.Speed, (uint)moveSpeeds[2]);

            spawnX = positionX;
            spawnY = positionY;
            spawnZ = positionZ;
        }