Ejemplo n.º 1
0
        public static CubeKun GetInstance(CubeKun prefab, Vector3 position, Quaternion rotation, Team team)
        {
            var cubekun = PoolManager.GetPoolSafe(prefab.gameObject).Get <CubeKun>(position, rotation);

            cubekun.Team = team;
            cubekun.Initialize();
            return(cubekun);
        }
Ejemplo n.º 2
0
        public CubeKun Spawn(CubeKun prefab)
        {
            if (!prefab)
            {
                throw new ArgumentNullException("prefab");
            }
            var ins = CubeKun.GetInstance(prefab, Tr.position, Tr.rotation, Team);

            return(ins);
        }
Ejemplo n.º 3
0
 protected override void OnCubeKunEnter(CubeKun cubekun)
 {
     if (GetTeamRelative(cubekun) != Team.Ally)
     {
         return;
     }
     for (int i = 0; cubekun.Weapons.Length > i; i++)
     {
         cubekun.Weapons[i].Replenishment();
     }
 }
Ejemplo n.º 4
0
        public void Shot(Transform point, CubeKun parent, int power, float speed, float time)
        {
            var ins = PoolManager.GetPoolSafe(gameObject).Get <Bullet>(point.position, point.rotation);

            Parent = parent;
            ins.gameObject.SetLayer("Bullet_" + parent.Team.ToString());
            ins.power = power;
            ins.speed = speed;
            ins.Trail.Clear();
            ins.DisableStart(time);
        }
Ejemplo n.º 5
0
 protected virtual void OnCubeKunEnter(CubeKun cubekun)
 {
 }