1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using UnityEngine;
- using System.Collections;
- public class StartPos : MapObject
- {
- public GameObject[] haloPrefabs;
- private GameObject haloObj;
- public override void Init (Map map)
- {
- base.Init (map);
- startPositionDirect = StartPostionDirect.Center;
- }
- public override TeamUtil.Team team {
- get {
- return base.team;
- }
- set {
- TeamUtil.Team oldTeam = base.team;
- base.team = value;
- if(oldTeam != value)
- {
- if(Application.isPlaying || !Application.isEditor)
- {
- if(haloObj != null)
- Destroy(haloObj);
-
- // if(value == TeamUtil.Team.Blue || value == TeamUtil.Team.Red)
- // {
- // haloObj = Instantiate<GameObject>(haloPrefabs[value.GetHashCode()-1]);
- // haloObj.transform.SetParent(this.transform);
- // haloObj.transform.localPosition = Vector3.zero;
- // }
- }
- }
- }
- }
- }
|