internal void getArrow() { if (holdingArrow == null) { holdingArrow = ArrowFactory.getInstance().getArrow(); } }
public static ArrowFactory getInstance() { if (instance == null) { instance = new ArrowFactory(); } return(instance); }
void Awake() { if (AF == null) { used = new List <GameObject>(); free = new List <GameObject>(); AF = Singleton <ArrowFactory> .Instance; } }
void Start() { SSDirector director = SSDirector.GetInstance(); arrow_factory = Singleton <ArrowFactory> .Instance; recorder = Singleton <ScoreRecorder> .Instance; director.CurrentScenceController = this; action_manager = gameObject.AddComponent <ArrowFlyActionManager>() as ArrowFlyActionManager; LoadResources(); CreateWind(); }
// Use this for initialization void Start() { start = true; SSDirector director = SSDirector.getInstance(); director.currentScenceController = this; director.currentScenceController.LoadResources(); user_gui = gameObject.AddComponent <UserGUI>() as UserGUI; actionManager = gameObject.AddComponent <CCArrowActionManager>(); AF = gameObject.AddComponent <ArrowFactory>(); }
void Awake() { whetherShoot = false; arrowOnTarget = null; SSDirector.getInstance().currentSceneController = this; SSDirector.getInstance().currentSceneController.LoadResources(); placeTarget(); PAM = Singleton <PhyciscActionManager> .Instance as ArrowAction; AF = Singleton <ArrowFactory> .Instance; SR = Singleton <ScoreRecorder> .Instance; }
void Start() { SSDirector director = SSDirector.GetInstance(); director.CurrentSceneControllor = this; arrow_factory = Singleton <ArrowFactory> .Instance; recorder = gameObject.AddComponent <ScoreRecorder>() as ScoreRecorder; user_gui = gameObject.AddComponent <UserGUI> () as UserGUI; action_manager = gameObject.AddComponent <ArrowFlyActionManager>() as ArrowFlyActionManager; LoadResources(); }
void Start() { SSDirector director = SSDirector.GetInstance(); arrow_factory = Singleton <ArrowFactory> .Instance; recorder = Singleton <ScoreRecorder> .Instance; director.CurrentScenceController = this; action_manager = gameObject.AddComponent <ArrowFlyActionManager>() as ArrowFlyActionManager; LoadResources(); main_camera.GetComponent <CameraFlow>().bow = bow; //the starting contitdion of wind wind_directX = Random.Range(-1, 1); wind_directY = Random.Range(-1, 1); //make wind CreateWind(); }
private void Start() { Director director = Director.getInstance(); director.currentSceneController = this; factory = this.gameObject.AddComponent <ArrowFactory>(); actionManager = this.gameObject.AddComponent <ArrowActionManager>() as ArrowActionManager; ui = this.gameObject.AddComponent <UI>(); judger = this.gameObject.AddComponent <Judger>(); // factory = Singleton<ArrowFactory>.Instance; loadResources(); int x = Random.Range(0, 3); int y = Random.Range(0, 3); x = direc[x]; y = direc[y]; int level = Random.Range(1, 5); wind = new Vector3(x, y, 0) * level; }
// Update is called once per frame void Update() { ArrowFactory.getInstance().detectArrowsReuse(); }
private void Awake() { ArrowFactory.getInstance().init(ArrowPrefabs); }