void ISeamothArm.SetSide(SeamothArm arm) { if (container != null) { container.onAddItem -= OnAddItem; container.onRemoveItem -= OnRemoveItem; } if (arm == SeamothArm.Right) { transform.localScale = new Vector3(-0.8f, 0.8f, 0.8f); container = seamoth.GetStorageInSlot(seamoth.GetSlotIndex("SeamothArmRight"), armTag.techType); } else { transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); container = seamoth.GetStorageInSlot(seamoth.GetSlotIndex("SeamothArmLeft"), armTag.techType); } if (container != null) { container.onAddItem += OnAddItem; container.onRemoveItem += OnRemoveItem; } UpdateVisuals(); }
void ISeamothArmControl.SetRotation(SeamothArm arm, bool isDocked) { if (ThisSeamoth == null) { return; } if (isDocked) { SubRoot subRoot = ThisSeamoth.GetComponentInParent <SubRoot>(); if (subRoot.isCyclops) { if (arm == SeamothArm.Right) { transform.localRotation = Quaternion.Euler(32, 336, 310); } else { transform.localRotation = Quaternion.Euler(32, 24, 50); } } else { transform.localRotation = Quaternion.Euler(346, 0, 0); } } else { transform.localRotation = Quaternion.Euler(346, 0, 0); } }
void ISeamothArmControl.SetSide(SeamothArm arm) { if (arm == SeamothArm.Right) { transform.localScale = new Vector3(-0.8f, 0.8f, 0.8f); } else { transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); } }
public void SetSide(SeamothArm arm) { if (arm == SeamothArm.Right) { transform.localScale = new Vector3(-0.80f, 0.80f, 0.80f); } else { transform.localScale = new Vector3(0.80f, 0.80f, 0.80f); } }
void ISeamothArm.SetSide(SeamothArm arm) { if (arm == SeamothArm.Right) { transform.localScale = new Vector3(-0.8f, 0.8f, 0.8f); propulsionCannon.localObjectOffset = new Vector3(0.75f, 0f, 0f); } else { transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); propulsionCannon.localObjectOffset = new Vector3(-0.75f, 0f, 0f); } }
void ISeamothArmControl.SetRotation(SeamothArm arm, bool isDocked) { if (ThisSeamoth == null) { return; } if (isDocked) { SubRoot subRoot = ThisSeamoth.GetComponentInParent <SubRoot>(); if (subRoot.isCyclops) { if (arm == SeamothArm.Right) { transform.localRotation = Quaternion.Euler(37, 327, 300); } else { transform.localRotation = Quaternion.Euler(37, 33, 60); } } else { if (arm == SeamothArm.Right) { transform.localRotation = Quaternion.Euler(20, 352, 20); } else { transform.localRotation = Quaternion.Euler(20, 8, 340); } } } else { if (arm == SeamothArm.Right) { transform.localRotation = Quaternion.Euler(355, 343, 19); } else { transform.localRotation = Quaternion.Euler(355, 17, 341); } } }
void ISeamothArmControl.SetSide(SeamothArm arm) { if (propulsionCannon == null) { propulsionCannon = GetComponent <PropulsionCannon>(); } if (arm == SeamothArm.Right) { transform.localScale = new Vector3(-0.8f, 0.8f, 0.8f); propulsionCannon.localObjectOffset = new Vector3(0.75f, 0f, 0f); } else { transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); propulsionCannon.localObjectOffset = new Vector3(-0.75f, 0f, 0f); } }
private void OnToggleSlot(int slotID, bool state) { if (state) { if (slotID == LeftArmSlotID) { currentSelectedArm = SeamothArm.Left; } else if (slotID == RightArmSlotID) { currentSelectedArm = SeamothArm.Right; } } else { currentSelectedArm = SeamothArm.None; ResetArms(); } }
void ISeamothArmControl.SetSide(SeamothArm arm) { if (container != null) { container.onAddItem -= OnAddItem; container.onRemoveItem -= OnRemoveItem; } if (arm == SeamothArm.Right) { transform.localScale = new Vector3(-0.8f, 0.8f, 0.8f); StartCoroutine(GetItemsContainer("SeamothArmRight")); } else { transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); StartCoroutine(GetItemsContainer("SeamothArmLeft")); } }
internal void RemoveArm(SeamothArm arm) { armsDirty = true; if (arm == SeamothArm.Left) { Destroy(leftArm.GetGameObject()); leftArm = null; currentLeftArmType = TechType.None; } else { Destroy(rightArm.GetGameObject()); rightArm = null; currentRightArmType = TechType.None; } SetLightsPosition(); armsDirty = false; }
internal void AddArm(SeamothArm arm, TechType techType) { armsDirty = true; if (arm == SeamothArm.Left) { if (leftArm != null) { Destroy(leftArm.GetGameObject()); leftArm = null; } leftArm = Main.graphics.SpawnArm(techType, leftArmAttach); leftArm.SetSide(Left); leftArm.SetRotation(Left, seamoth.docked); currentLeftArmType = techType; } else { if (rightArm != null) { Destroy(rightArm.GetGameObject()); rightArm = null; } rightArm = Main.graphics.SpawnArm(techType, rightArmAttach); rightArm.SetSide(Right); rightArm.SetRotation(Right, seamoth.docked); currentRightArmType = techType; } SetLightsPosition(); vfxConstructing.Regenerate(); armsDirty = false; UpdateColliders(); UpdateArmRenderers(); }