private void Start() { inst_Character = CharacterManager.getInstance(); MinimapCamera = inst_Character.GetComponent <Transform>().Find("MinimapCamera").GetComponent <Camera>(); UpdateMinimapScale(); inst_Minimap = MinimapManager.getInstance(); }
static private Vector3 CalcMouseDirectionInWorldSpace() { if (inst_character == null) { inst_character = CharacterManager.getInstance(); } if (inst_minimap == null) { inst_minimap = MinimapManager.getInstance(); } Vector3 clippedPos = Input.mousePosition; clippedPos.x = Mathf.Clamp(clippedPos.x, 0, Screen.width); clippedPos.y = Mathf.Clamp(clippedPos.y, 0, Screen.height); Ray ray = Camera.main.ScreenPointToRay(clippedPos); RaycastHit hit; int mask = 1 << inst_minimap.layerMask; if (Physics.Raycast(ray, out hit, float.MaxValue, mask)) { return((hit.point - inst_character.transform.position).normalized); } //이 아래줄은 실행되면 안 됨. 스킬은 어떤 경우에서도 나가야하므로. return(Vector3.zero); }
protected override void Initialize() { base.Initialize(); if (!this.Fallen) { MinimapManager.AddMinimapObject(this); } }
protected override void Initialize() { base.Initialize(); this.UpdateGrowthOccupancy(); if (!this.Fallen) { MinimapManager.AddMinimapObject(this); } }
void Awake() { scale = defaultScale; if (_instance == null) { _instance = FindObjectOfType <MinimapManager>(); } guideCamera = GameObject.Find("Guide Camera").GetComponent <Camera>(); }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
void Awake() { if (instance == null) { instance = this; } if (instance != this) { DestroyImmediate(this); } DontDestroyOnLoad(this); }
protected override void Initialize() { base.Initialize(); // Fill in occupancy (CurrentThreshold shouldn't get serialized so this will fill the whole tree) this.GrowthPercent = this.growthPercent; if (!this.Fallen) { MinimapManager.AddMinimapObject(this); } }
void OnMouseOver() { if (Input.GetAxis("Mouse ScrollWheel") > 0) { MinimapManager.SetScale(+5, true); clock = Time.time; } else if (Input.GetAxis("Mouse ScrollWheel") < 0) { MinimapManager.SetScale(-5, true); clock = Time.time; } }
void Awake() { try { LoadMap(); } catch (System.Exception e) { Debug.Log("Failed to load map. regenerating: " + e); RegenerateMap(); } world = new Game.World(map, navi); world.eventListener = this; worldManager = GetComponent <WorldManager>(); var mm_go = Instantiate(minimapPrefab); mm_go.transform.SetParent(minimapContainer, false); minimapManager = mm_go.GetComponent <MinimapManager>(); minimapManager.map = map; }
public override void Destroy() { var treeBlockCheck = this.Position.Round; for (int i = 0; i <= GrowthThresholds.Length; i++) { var block = World.GetBlock(treeBlockCheck); if (block.GetType() == this.Species.BlockType) { World.DeleteBlock(treeBlockCheck); } if (block.Is <Solid>()) { break; } treeBlockCheck += Vector3i.Up; } MinimapManager.RemoveMinimapObject(this); base.Destroy(); }
void Awake() { currentInstance = this; }
void Start() { inst_minimap = MinimapManager.getInstance(); }
void OnApplicationQuit() { Instance = null; }
public void SetUp(int xPos, int yPos) { this.pieceMapX = xPos; this.pieceMapY = yPos; minimapManager = GameObject.Find(Constants.GAMEOBJECT_MINIMAP).GetComponent <MinimapManager>(); }
void Awake() { Instance = this; player = GameObject.FindGameObjectWithTag("Player").transform; }
// Use this for initialization void Start() { man = MinimapManager.Instance; }