void Start() { m_legionCtrl = m_ctrl.GetComponentInParent <UserLegionCtrl>(); XLogger.LogValidObject(m_legionCtrl == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("UserLegionCtrl"), gameObject); m_userID = m_ctrl.targetUser.GetComponent <UserData>().userID; }
void Start() { XLogger.LogValidObject(m_camera == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Camera"), gameObject); m_charCtrl = this.GetComponent <CharAnimateMenuCtrl>(); m_userdata = this.GetComponent <UserData>(); }
private float m_slerpTime = 0.0f; // value >= m_autoRotateTime -> end void Awake() { XLogger.LogValidObject(m_pivot == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Pivot"), gameObject); XLogger.LogValidObject(m_target == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Target"), gameObject); m_slerpTime = m_autoRotateTime; }
/// <summary> /// 残弾数の追加 /// </summary> /// <param name="val">追加量:(value > 0)</param> public void AddBullet(int val) { XLogger.LogValidObject(val <= 0, "Invalid Argument MagazineUnit AddBullet: " + val.ToString()); bulletNum += val; if (bulletNum >= capacity) { bulletNum = capacity; } }
protected override void CoordinateCollider(Transform transParent) { m_collider = transParent.GetComponent <BoxCollider>(); XLogger.LogValidObject(m_collider, "DbgSys:GetComponent<BoxCollider>", gameObject); this.transform.localPosition = m_collider.center; this.transform.localScale = m_collider.size; this.transform.rotation = transParent.rotation; }
/// <summary> /// 残弾数の減算 /// </summary> /// <param name="val">追加量:(value > 0)</param> public void SubBullet(int val) { XLogger.LogValidObject(val <= 0, "Invalid Argument MagazineUnit SubBullet: " + val.ToString()); bulletNum -= val; if (bulletNum < 0) { bulletNum = 0; XLogger.LogError("Bullet Overflow"); } XLogger.Log("Magazine SubBullet: " + val.ToString() + " " + bulletNum.ToString() + "/" + capacity.ToString()); }
protected override void CoordinateCollider(Transform transParent) { m_collider = transParent.GetComponent <SphereCollider>(); XLogger.LogValidObject(m_collider, "DbgSys:GetComponent<SphereCollider>", gameObject); this.transform.localPosition = m_collider.center; float size = m_collider.radius * 2.0f; this.transform.localScale = new Vector3(size, size, size); this.transform.localRotation = transParent.localRotation; }
protected override void CoordinateCollider(Transform transParent) { m_obstacle = transParent.GetComponent <NavMeshObstacle>(); XLogger.LogValidObject(m_obstacle, "DbgSys:GetComponent<NavMeshObstacle:Box>", gameObject); if (m_obstacle.shape == NavMeshObstacleShape.Box) { this.transform.localPosition = m_obstacle.center; this.transform.localScale = m_obstacle.size; this.transform.rotation = transParent.rotation; } else { XLogger.LogError("Invalid NavMeshObstacle: type=Capsule"); } }
protected override void CoordinateCollider(Transform transParent) { m_obstacle = transParent.GetComponent <NavMeshObstacle>(); XLogger.LogValidObject(m_obstacle, "DbgSys:GetComponent<NavMeshObstacle:Capsule>", gameObject); if (m_obstacle.shape == NavMeshObstacleShape.Capsule) { this.transform.localPosition = m_obstacle.center; float size = m_obstacle.radius * 2.0f; this.transform.localScale = new Vector3(size, m_obstacle.height * 0.50f, size); this.transform.localRotation = transParent.localRotation; } else { XLogger.LogError("Invalid NavMeshObstacle: type=Box"); } }
void Awake() { XLogger.LogValidObject(m_parent == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Parent"), gameObject); XLogger.LogValidObject(m_bullet == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Bullte"), gameObject); XLogger.LogValidObject(m_bulletBouquet == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("BullteBouquet"), gameObject); XLogger.LogValidObject(m_hitPoint == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("HitPoint"), gameObject); XLogger.LogValidObject(m_efReload == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Effect Reload"), gameObject); XLogger.LogValidObject(m_efMaxCharge == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Effect MaxCharge"), gameObject); m_magazine = this.GetComponent <LauncherMagazine>(); m_lineRenderer = this.GetComponent <LineRenderer>(); GameObject efCharging = XFunctions.InstanceChild(m_efCharging, Vector3.zero, Quaternion.identity, this.gameObject); GameObject efObj = XFunctions.InstanceChild(m_efMaxCharge, Vector3.zero, Quaternion.identity, this.gameObject); GameObject efReloadObj = XFunctions.InstanceChild(m_efReload, Vector3.zero, Quaternion.identity, this.gameObject); m_csEfCharging = efCharging.GetComponent <IEffect>(); m_csEfMaxCharge = efObj.GetComponent <IEffect>(); m_csEfReload = efReloadObj.GetComponent <IEffect>(); }
/// <summary> /// 最大値の追加 /// </summary> /// <param name="val">追加量:(value > 0)</param> public void AddCapacity(int val) { XLogger.LogValidObject(val <= 0, "Invalid Argument MagazineUnit AddCapacity: " + val.ToString()); capacity += val; XLogger.Log("Magazine AddCapacity: " + val.ToString() + " " + bulletNum.ToString() + "/" + capacity.ToString()); }
// Awake is called when the script instance is being loaded. void Awake() { m_renderer = this.GetComponent <MeshRenderer>(); XLogger.LogValidObject(m_renderer, "DbgSys:GetComponent<MeshRenderer>", gameObject); }
void Awake() { XLogger.LogValidObject(m_pivot == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Pivot"), gameObject); XLogger.LogValidObject(m_targetUser == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Target"), gameObject); }