Example #1
0
 public override void Die()
 {
     fight.CurrentAnimation.Abort();
     sword.gameObject.SetActive(false);
     fight.AbortAggression();
     dialog.SetDialogProgress(1);
     GameManager.Story.defeatedSteersman = true;
     GetComponent <DialogTrigger>().EnableInteraction();
     GameManager.Story.IsFightingSteersman     = false;
     GetComponent <PirateSwordFight>().enabled = false;
 }
 private void OnTriggerEnter(Collider other)
 {
     if (!fired && other.tag == "Steersman" && GameManager.Story.defeatedSteersman)
     {
         Transform cell = GameObject.FindGameObjectWithTag("Cell").transform;
         cell.GetComponent <HideOnPlay>().Show();
         other.GetComponent <DialogTrigger>().DisableInteraction();
         other.GetComponent <MoveTowards>().enabled   = false;
         other.GetComponent <Rigidbody>().isKinematic = true;
         //  other.transform.LookAt()
         other.transform.parent = cell;
         other.transform.LookAt(transform);
         other.transform.Rotate(0, 180, 0);
         other.transform.localPosition = new Vector3(0.2f, 1.75f, -1.2f);
         dialog.SetDialogProgress(2);
         fired = true;
     }
 }