// Variable #region Variable #endregion // Property #region Property #endregion // MonoBehaviour #region MonoBehaviour #endregion // Private Method #region Private Method #endregion // Public Method #region Public Method public override void Instantiate(GameObject _GameObject, Vector3 _StandardPos, int _row, int _Cloum, Transform _ParentTransform) { var player = Instantiate <GameObject>(_GameObject, new Vector3(_StandardPos.x + (0.16f * _row), _StandardPos.y + (0.16f * _Cloum), 0), Quaternion.identity, _ParentTransform); GameCamera.Instance.SetActiveCamera(GameCamera.CameraKind.PlayerCamera); GameCamera.Instance.GetCameraObjectComponent <PlayerCamera>(GameCamera.CameraKind.PlayerCamera).SetPlayer(player.transform); player.name = Common.PlayerName; SpawnObjects.Add(player); }
public bool AddSpawnObject(SpawnObject so) { if (m_SpawnObjects.FirstOrDefault(s => ParseType(s.SpawnName.ToLower()) == ParseType(so.SpawnName.ToLower())) == null && m_SpawnObjects.Count < SpawnerGump.MaxEntries) { SpawnObjects.Add(so); return(true); } return(false); }
// Variable #region Variable #endregion // Property #region Property #endregion // MonoBehaviour #region MonoBehaviour #endregion // Private Method #region Private Method #endregion // Public Method #region Public Method public override void Instantiate(GameObject _GameObject, Vector3 _StandardPos, int _row, int _Cloum, Transform _ParentTransform) { GameObject f_gameObject = Instantiate <GameObject>(_GameObject, new Vector3(_StandardPos.x + (0.16f * _row), _StandardPos.y + (0.16f * _Cloum), 0), Quaternion.identity, _ParentTransform); Enemy f_Enemy = f_gameObject.GetComponent <Enemy>(); EnemyDirection(f_Enemy, _row, _Cloum); f_Enemy.Property_SpriteRenderer.enabled = false; f_Enemy.enabled = false; SpawnObjects.Add(f_gameObject); }
public BreakableObjectPropertiesViewModel( TreeViewViewModel treeParent, CompoundObjectViewModel parentVm, MainViewModel mainVm, BreakableObjectProperties modelObject, bool enabled = true) : base(treeParent, parentVm, mainVm, enabled) { ModelObject = modelObject; foreach (SpawnObject so in ModelObject.SpawnObjects) { SpawnObjectViewModel sovm = new SpawnObjectViewModel(this, parentVm, mainVm, so); SpawnObjects.Add(sovm); } }
// Public Method #region Public Method /// <summary> /// ObjectTile를 생성시 작업 /// Isntantiate를 통해서 자신의 객층구조상 위치(부모의 Transform)에 객체를 생성하며, /// 생성시 Renderer를 끄고, 필요한 기본정보를 작성 해줌 /// </summary> /// <param name="_GameObject">만들 객체</param> /// <param name="_StandardPos">타일의 0,0값</param> /// <param name="_row">행</param> /// <param name="_Cloum">렬</param> /// <param name="_ParentTransform">부모의 Transform</param> override public void Instantiate(GameObject _GameObject, Vector3 _StandardPos, int _row, int _Cloum, Transform _ParentTransform) { GameObject f_Object = Instantiate <GameObject>(_GameObject, new Vector3(_StandardPos.x + (0.16f * _row), _StandardPos.y + (0.16f * _Cloum), 0), Quaternion.identity, _ParentTransform); TileObject f_TileObject = f_Object.GetComponent <TileObject>(); f_TileObject.Renderer.enabled = false; if (f_TileObject != null) { f_TileObject.Initialized(_row, _Cloum); SetObjectPoket(f_TileObject, _row, _Cloum); } SpawnObjects.Add(f_Object); }
public ObjectFactoryPropertiesViewModel( TreeViewViewModel treeParent, CompoundObjectViewModel parentVm, MainViewModel mainVm, ObjectFactoryProperties modelObject, CoSystemViewModel systemViewModel) : base(treeParent, parentVm, mainVm, systemViewModel) { _modelObject = modelObject; if (_modelObject != null) { _bodyObject = ParentVm.FindBodyObject(_modelObject.Body); } foreach (SpawnObject so in LocalModelObject.SpawnObjects) { SpawnObjectViewModel sovm = new SpawnObjectViewModel(this, parentVm, mainVm, this, so); SpawnObjects.Add(sovm); } UpdateCornerPoints(); }
// Variable #region Variable #endregion // Property #region Property #endregion // MonoBehaviour #region MonoBehaviour #endregion // Private Method #region Private Method #endregion // Public Method #region Public Method override public void Instantiate(Tile _Tile, Vector3 _StandardPos, int _row, int _Cloum, Tilemap _Tilemap) { _Tilemap.SetTile(new Vector3Int(_row, _Cloum, 0), _Tile); SpawnObjects.Add(_Tile); }
public override void Instantiate(GameObject _GameObject, Vector3 _StandardPos, int _row, int _Cloum, Transform _ParentTransform) { var Item = Instantiate <GameObject>(_GameObject, new Vector3(_StandardPos.x + (0.16f * _row), _StandardPos.y + (0.16f * _Cloum), 0), Quaternion.identity, _ParentTransform); SpawnObjects.Add(Item); }