Exemplo n.º 1
0
    public Devil(Vector3 position)
    {
        rightBankPos = position;
        leftBankPos  = new Vector3(-rightBankPos.x, 3.5f, 0);
        path         = "Prefabs/Devil";
        state        = State.right;
        model        = Instantiate(Resources.Load(path), position, Quaternion.identity) as GameObject;
        Click click = model.AddComponent(typeof(Click)) as Click;

        isClicked = false;
        click.SetRole(this);
    }
Exemplo n.º 2
0
 public RoleModel(string role_name)
 {
     if (role_name == "priest")
     {
         role      = Object.Instantiate(Resources.Load("Priest", typeof(GameObject)), Vector3.zero, Quaternion.Euler(0, -90, 0)) as GameObject;
         role_sign = 0;
     }
     else
     {
         role      = Object.Instantiate(Resources.Load("Devil", typeof(GameObject)), Vector3.zero, Quaternion.Euler(0, -90, 0)) as GameObject;
         role_sign = 1;
     }
     click = role.AddComponent(typeof(Click)) as Click;
     click.SetRole(this);
 }
 public RoleModel(string role_name)
 {
     if (role_name == "priest")
     {
         role      = Object.Instantiate(Resources.Load("Priest", typeof(GameObject)), Vector3.zero, Quaternion.Euler(0, 180, 0)) as GameObject;
         role_sign = 0;
     }
     else
     {
         role      = Object.Instantiate(Resources.Load("Devil", typeof(GameObject)), Vector3.zero, Quaternion.Euler(0, 180, 0)) as GameObject;
         role_sign = 1;
     }
     //move = role.AddComponent(typeof(Move)) as Move;
     click    = role.AddComponent(typeof(Click)) as Click;
     play_ani = role.AddComponent(typeof(PlayAnimation)) as PlayAnimation;
     click.SetRole(this);
 }
Exemplo n.º 4
0
 public RoleModel(string role_name, Vector3 pos)
 {
     if (role_name == "priest")
     {
         role = Object.Instantiate(
             Resources.Load <GameObject>("Prefabs/Priest"),
             pos, Quaternion.Euler(0, -90, 0)) as GameObject;
         role_sign = 0;
     }
     else
     {
         role = Object.Instantiate(
             Resources.Load <GameObject>("Prefabs/Devil"),
             pos, Quaternion.Euler(0, -90, 0)) as GameObject;
         role_sign = 1;
     }
     land_sign = 1;
     click     = role.AddComponent(typeof(Click)) as Click;
     click.SetRole(this);
 }
Exemplo n.º 5
0
 public RoleModel(string roleType)
 {
     onBoat = false;
     side   = 1;
     if (roleType == "priest")
     {
         role = Object.Instantiate(
             Resources.Load <GameObject>("Prefabs/Priest"),
             Vector3.zero, Quaternion.Euler(0, 270, 0));
         good = true;
     }
     else if (roleType == "devil")
     {
         role = Object.Instantiate(
             Resources.Load <GameObject>("Prefabs/Devil"),
             Vector3.zero, Quaternion.Euler(0, 270, 0));
         good = false;
     }
     click = role.AddComponent(typeof(Click)) as Click;
     click.SetRole(this);
 }