void Update() { StartCoroutine(IsoCamera.Zoom(-Input.GetAxis("Mouse ScrollWheel"))); if (Input.GetKeyDown("a")) { StartCoroutine(IsoCamera.RotateClockwise()); } if (Input.GetKeyDown("d")) { StartCoroutine(IsoCamera.RotateCounterClockwise()); } }
void Awake() { IsoResources.Load("Assets/Config/Resources.cfg"); IsoCamera.Init(); IsoMap.Load("Assets/Maps/TestMap1.map"); }
void Awake() { IsoCamera.Init(); IsoCamera.zoomMultiplier = 4; }
void Start() { GameMaster.CurrentState = GameMaster.GameState.PLAYER_TURN; camNullScript = Camera.main.gameObject.transform.parent.GetComponent<IsoCamera>(); nextPosition = curPosition = transform.position; // Force player to grid transform.position = new Vector3(Mathf.Floor(transform.position.x), 0f, Mathf.Floor(transform.position.z)); gridPlanes = new ArrayList(); // Initialize player stats... curr_Health = max_Health; //set player to maximum health //curr_Cargo = max_Cargo; //set cargo to maximum capacity //InvokeRepeating("decreaseHealth", 1f, 1f); just for testing purposes, this decreases health by 2 every second //SetCargoBar(curr_Cargo); GameObject HUD = GameObject.FindGameObjectWithTag("HUD"); hudScript = HUD.GetComponent<HUDScript>(); audio = gameObject.AddComponent<AudioSource>(); empSound = gameObject.AddComponent<AudioSource>(); empSound.clip = AudioController.effect[2]; switch (SpawnMaster.CURRENT_STATE) { case (SpawnMaster.SpawnState.SMALL): { max_Cargo = SpawnMaster.SMALL_CARGO; } break; case (SpawnMaster.SpawnState.MEDIUM): { max_Cargo = SpawnMaster.MEDIUM_CARGO; } break; case (SpawnMaster.SpawnState.LARGE): { max_Cargo = SpawnMaster.LARGE_CARGO; } break; } }